/*
 * @Copyright: 2016 www.yyfax.com Inc. All rights reserved.
 */
package com.yyfax.pay.order.data.dao;

import com.yyfax.framework.dao.BaseDao;
import com.yyfax.pay.order.model.po.PayOrderExtPO;

/**
 * 支付订单附加信息持久化接口
 *
 * @author buyi
 * @date 2017-04-12 11:09:15
 * @since 1.0.0
 */
public interface PayOrderExtDao extends BaseDao<PayOrderExtPO, Integer> {

	/**
	 * 根据主键获取实体
	 * 
	 * @user jiangmy
	 * @date 2017-04-12 11:09:15
	 * @since 1.0.0
	 * @param id 自增主键
	 * @param merchantCode 商户编号(为分表预留参数)
	 * @return
	 */
	public PayOrderExtPO selectByIdAndMerchantCode(int id, String merchantCode) throws Exception;

	/**
	 * 查询订单附加信息
	 * 
	 * @author buyi
	 * @date 2017-04-16 11:48:54
	 * @since v1.0.0
	 * @param payOrderId
	 * @param merchantCode
	 * @return
	 */
	public PayOrderExtPO selectByPayOrderId(String payOrderId, String merchantCode);

	/**
	 * 更新手机号
	 * 
	 * @author buyi
	 * @date 2017-04-26 14:29:00
	 * @since v1.0.0
	 * @param id
	 * @param phone
	 */
	public int updatePhone(int id, String phone);
	
	/**
	 * 删除订单附加信息
	 * 
	 * @author buyi
	 * @date 2017-05-15 20:02:09
	 * @since v1.0.0
	 *
	 * @param payOrderId
	 * @return
	 */
	public int delete(String payOrderId);
}
